﻿using AuthCenter.Domain;

namespace AuthCenter.Application
{
    public interface IBaseRepository<T> where T : BaseEntity
    {
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Create(T t);
        /// <summary>
        /// 批量添加
        /// </summary>
        /// <param name="values"></param>
        /// <returns></returns>
        int Create(List<T> values);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="t"></param>
        /// <returns></returns>
        int Update(T t);
        /// <summary>
        /// 根据编号查
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        T GetModel(long id);
        /// <summary>
        /// 查全部
        /// </summary>
        /// <returns></returns>
        IQueryable<T> GetAll();

    }
}
